home *** CD-ROM | disk | FTP | other *** search
- Path: quagga.ru.ac.za!rucus!ray
- From: ray@rucus.ru.ac.za (Ray Heasman)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Random Number Generation
- Date: 21 Feb 1996 15:49:24 GMT
- Organization: Rhodes University, Grahamstown
- Message-ID: <4gfeu4$7s9@quagga.ru.ac.za>
- References: <692.6619T1254T1752@in.net> <4ge7pc$1v2@news.internet.dk>
- NNTP-Posting-Host: rucus.ru.ac.za
- X-Newsreader: TIN [version 1.2 PL2]
-
- Kasper B. Graversen (kbg2001@internet.dk) wrote:
- : Hi John...
- : You wrote about <Random Number Generation>
-
- : JJM> num=rand()%1000; /*Try to modify rand()s output to be*/
- : JJM> num/=100; /*between 0 and 1*/
-
- : Why not just num = rand()%2
-
- : ??
-
- Umm... you can do a nice Random number generator using 3 assembler
- instructions - an eor, a bcc and a shift.
-
- If anyone is interested, mail me at ray@rucus.ru.ac.za
-
- Cheerio,
- Ray
- --
- _/_/_/ ""\ ""\ ""\ ""\ """""""\ ""\ _/_/_/_/_/_/_/_/_/_/_/
- _/_/_/ """"\ """\ """\ ""\ ""\ """"\ _/ StarWriter / _/
- _/_/_/ ""\ ""\ ""\"""\""\ ""\ ""\ """\ ""\ ""\ _/ Genisys _/
- _/_/_/ _/_/_/ """"""""\ ""\ "\ ""\ ""\ ""\ ""\ """"""""\ _/ _/
- _/_/_/_/_/ ""\ ""\ ""\ ""\ ""\ """""""\ ""\ ""\ _/_/_/_/_/_/_/
- _/_/_/ Amiga - The canvas of the Gods.
-
-
-
-
-
-
-
-
-
-
-
-
-
-